<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: helib::SecKey Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehelib.html">helib</a></li><li class="navelem"><a class="el" href="classhelib_1_1_sec_key.html">SecKey</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhelib_1_1_sec_key-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">helib::SecKey Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The secret key.  
 <a href="classhelib_1_1_sec_key.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="keys_8h_source.html">keys.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for helib::SecKey:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classhelib_1_1_sec_key.png" usemap="#helib::SecKey_map" alt=""/>
  <map id="helib::SecKey_map" name="helib::SecKey_map">
<area href="classhelib_1_1_pub_key.html" title="The public key." alt="helib::PubKey" shape="rect" coords="0,0,89,24"/>
  </map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a6e4c7855fbe80883f4207e011c74e22b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a6e4c7855fbe80883f4207e011c74e22b">SecKey</a> ()=delete</td></tr>
<tr class="separator:a6e4c7855fbe80883f4207e011c74e22b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4a76975c743941bae142bd524de4d3ee"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a4a76975c743941bae142bd524de4d3ee">~SecKey</a> () override=default</td></tr>
<tr class="separator:a4a76975c743941bae142bd524de4d3ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa1c8653eefcac6ffeae0dd9c7ce9e34e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#aa1c8653eefcac6ffeae0dd9c7ce9e34e">SecKey</a> (const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;_context)</td></tr>
<tr class="separator:aa1c8653eefcac6ffeae0dd9c7ce9e34e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89f716652c0dcd439905d4769647040d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a89f716652c0dcd439905d4769647040d">operator==</a> (const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;other) const</td></tr>
<tr class="separator:a89f716652c0dcd439905d4769647040d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d2a050b717383ff79c735306002b89f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a0d2a050b717383ff79c735306002b89f">operator!=</a> (const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;other) const</td></tr>
<tr class="separator:a0d2a050b717383ff79c735306002b89f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae51b00cb02aa6e958f19c8a27eb40204"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#ae51b00cb02aa6e958f19c8a27eb40204">clear</a> () override</td></tr>
<tr class="memdesc:ae51b00cb02aa6e958f19c8a27eb40204"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear all secret-key data.  <a href="classhelib_1_1_sec_key.html#ae51b00cb02aa6e958f19c8a27eb40204">More...</a><br /></td></tr>
<tr class="separator:ae51b00cb02aa6e958f19c8a27eb40204"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b196190eb15a05ebc9504a24fac4dcc"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a8b196190eb15a05ebc9504a24fac4dcc">ImportSecKey</a> (const <a class="el" href="classhelib_1_1_double_c_r_t.html">DoubleCRT</a> &amp;sKey, double bound, long ptxtSpace=0, long maxDegKswitch=3)</td></tr>
<tr class="separator:a8b196190eb15a05ebc9504a24fac4dcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a101e0d4a5d06aaab7db1c1a776fc66c6"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a101e0d4a5d06aaab7db1c1a776fc66c6">GenSecKey</a> (long hwt=0, long ptxtSpace=0, long maxDegKswitch=3)</td></tr>
<tr class="separator:a101e0d4a5d06aaab7db1c1a776fc66c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a350d34d3415174be94701ed1b62fc0b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a350d34d3415174be94701ed1b62fc0b0">GenKeySWmatrix</a> (long fromSPower, long fromXPower, long fromKeyIdx=0, long toKeyIdx=0, long ptxtSpace=0)</td></tr>
<tr class="separator:a350d34d3415174be94701ed1b62fc0b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d0dd7ac99a4431c16149607adf46995"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a3d0dd7ac99a4431c16149607adf46995">Decrypt</a> (NTL::ZZX &amp;plaintxt, const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt) const</td></tr>
<tr class="separator:a3d0dd7ac99a4431c16149607adf46995"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64b2c5e68619fb09448d91c697827fec"><td class="memTemplParams" colspan="2">template&lt;typename Scheme &gt; </td></tr>
<tr class="memitem:a64b2c5e68619fb09448d91c697827fec"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a64b2c5e68619fb09448d91c697827fec">Decrypt</a> (<a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; Scheme &gt; &amp;plaintxt, const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt) const</td></tr>
<tr class="memdesc:a64b2c5e68619fb09448d91c697827fec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypt a ciphertext into a plaintext.  <a href="classhelib_1_1_sec_key.html#a64b2c5e68619fb09448d91c697827fec">More...</a><br /></td></tr>
<tr class="separator:a64b2c5e68619fb09448d91c697827fec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fa22860d6aafccc5063a483ec6056a4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a6fa22860d6aafccc5063a483ec6056a4">Decrypt</a> (NTL::ZZX &amp;plaintxt, const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, NTL::ZZX &amp;f) const</td></tr>
<tr class="memdesc:a6fa22860d6aafccc5063a483ec6056a4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debugging version, returns in f the polynomial before reduction modulo the ptxtSpace.  <a href="classhelib_1_1_sec_key.html#a6fa22860d6aafccc5063a483ec6056a4">More...</a><br /></td></tr>
<tr class="separator:a6fa22860d6aafccc5063a483ec6056a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4dce93de49598069ce22e850c4ce824"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#ad4dce93de49598069ce22e850c4ce824">skEncrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt, const NTL::ZZX &amp;ptxt, long ptxtSpace, long skIdx) const</td></tr>
<tr class="memdesc:ad4dce93de49598069ce22e850c4ce824"><td class="mdescLeft">&#160;</td><td class="mdescRight">Symmetric encryption using the secret key.  <a href="classhelib_1_1_sec_key.html#ad4dce93de49598069ce22e850c4ce824">More...</a><br /></td></tr>
<tr class="separator:ad4dce93de49598069ce22e850c4ce824"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a070001bd33906bc22e133db9f31c07cd"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a070001bd33906bc22e133db9f31c07cd">skEncrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;ptxt, long ptxtSpace, long skIdx) const</td></tr>
<tr class="separator:a070001bd33906bc22e133db9f31c07cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a623e7afa711f904482381dd31476502d"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a623e7afa711f904482381dd31476502d">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, long ptxtSpace=0) const override</td></tr>
<tr class="separator:a623e7afa711f904482381dd31476502d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8173d4d2d15958e9ba7ceb0a28d21179"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a8173d4d2d15958e9ba7ceb0a28d21179">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, long ptxtSpace=0) const override</td></tr>
<tr class="separator:a8173d4d2d15958e9ba7ceb0a28d21179"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69d79957cc0259376b9ab024c2d643dd"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a69d79957cc0259376b9ab024c2d643dd">genRecryptData</a> ()</td></tr>
<tr class="memdesc:a69d79957cc0259376b9ab024c2d643dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate bootstrapping data if needed, returns index of key.  <a href="classhelib_1_1_sec_key.html#a69d79957cc0259376b9ab024c2d643dd">More...</a><br /></td></tr>
<tr class="separator:a69d79957cc0259376b9ab024c2d643dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e15e33f3688426b326404123804291a"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a1e15e33f3688426b326404123804291a">void ::helib::writeSecKeyBinary</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;sk)</td></tr>
<tr class="separator:a1e15e33f3688426b326404123804291a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f35adf909fde993329e2253f54565f4"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a7f35adf909fde993329e2253f54565f4">void ::helib::readSecKeyBinary</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;sk)</td></tr>
<tr class="separator:a7f35adf909fde993329e2253f54565f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a039945ecbbe337f7fba1cde992ebf825"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a039945ecbbe337f7fba1cde992ebf825"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a039945ecbbe337f7fba1cde992ebf825">Decrypt</a> (<a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_b_g_v.html">BGV</a> &gt; &amp;plaintxt, const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt) const</td></tr>
<tr class="separator:a039945ecbbe337f7fba1cde992ebf825"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5602ff47445696d3af12ba6114eebea4"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a5602ff47445696d3af12ba6114eebea4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a5602ff47445696d3af12ba6114eebea4">Decrypt</a> (<a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_c_k_k_s.html">CKKS</a> &gt; &amp;plaintxt, const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt) const</td></tr>
<tr class="separator:a5602ff47445696d3af12ba6114eebea4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classhelib_1_1_pub_key"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classhelib_1_1_pub_key')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classhelib_1_1_pub_key.html">helib::PubKey</a></td></tr>
<tr class="memitem:aafaeff3bae5bac16d5a4bf127e2f6f2d inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aafaeff3bae5bac16d5a4bf127e2f6f2d">PubKey</a> ()</td></tr>
<tr class="memdesc:aafaeff3bae5bac16d5a4bf127e2f6f2d inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">This constructor thorws run-time error if activeContext=nullptr.  <a href="classhelib_1_1_pub_key.html#aafaeff3bae5bac16d5a4bf127e2f6f2d">More...</a><br /></td></tr>
<tr class="separator:aafaeff3bae5bac16d5a4bf127e2f6f2d inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a825712e884ac70538420e3cd3d553e22 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a825712e884ac70538420e3cd3d553e22">PubKey</a> (const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;_context)</td></tr>
<tr class="separator:a825712e884ac70538420e3cd3d553e22 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa923dff5492cd91bbf8d24ab9258ce1a inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa923dff5492cd91bbf8d24ab9258ce1a">PubKey</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other)</td></tr>
<tr class="memdesc:aa923dff5492cd91bbf8d24ab9258ce1a inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor.  <a href="classhelib_1_1_pub_key.html#aa923dff5492cd91bbf8d24ab9258ce1a">More...</a><br /></td></tr>
<tr class="separator:aa923dff5492cd91bbf8d24ab9258ce1a inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabd77762ff776bfbf3ae389b49fa7ac9 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aabd77762ff776bfbf3ae389b49fa7ac9">~PubKey</a> ()=default</td></tr>
<tr class="memdesc:aabd77762ff776bfbf3ae389b49fa7ac9 inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor.  <a href="classhelib_1_1_pub_key.html#aabd77762ff776bfbf3ae389b49fa7ac9">More...</a><br /></td></tr>
<tr class="separator:aabd77762ff776bfbf3ae389b49fa7ac9 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a054c57be24207281e69608bed29b2 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ae7a054c57be24207281e69608bed29b2">operator==</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other) const</td></tr>
<tr class="separator:ae7a054c57be24207281e69608bed29b2 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a014ede31ce4b686ddf491d30cd7a581a inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a014ede31ce4b686ddf491d30cd7a581a">operator!=</a> (const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;other) const</td></tr>
<tr class="separator:a014ede31ce4b686ddf491d30cd7a581a inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa58d563a7ee4e27f2c46f97a3f5997dc inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa58d563a7ee4e27f2c46f97a3f5997dc">getContext</a> () const</td></tr>
<tr class="separator:aa58d563a7ee4e27f2c46f97a3f5997dc inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa470fb7bc65e658efd02858188078384 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa470fb7bc65e658efd02858188078384">getPtxtSpace</a> () const</td></tr>
<tr class="separator:aa470fb7bc65e658efd02858188078384 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa19bebb6be7b4cedb58a1a045df68b3a inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aa19bebb6be7b4cedb58a1a045df68b3a">keyExists</a> (long keyID) const</td></tr>
<tr class="separator:aa19bebb6be7b4cedb58a1a045df68b3a inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af00d3629c7dc16946cc48942edf797fb inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#af00d3629c7dc16946cc48942edf797fb">getSKeyBound</a> (long keyID=0) const</td></tr>
<tr class="memdesc:af00d3629c7dc16946cc48942edf797fb inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">The size of the secret key.  <a href="classhelib_1_1_pub_key.html#af00d3629c7dc16946cc48942edf797fb">More...</a><br /></td></tr>
<tr class="separator:af00d3629c7dc16946cc48942edf797fb inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67598f5056cba7b1b94fcdd8482a947c inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a67598f5056cba7b1b94fcdd8482a947c">isReachable</a> (long k, long keyID=0) const</td></tr>
<tr class="memdesc:a67598f5056cba7b1b94fcdd8482a947c inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is it possible to re-linearize the automorphism X -&gt; X^k See Section 3.2.2 in the design document (KeySwitchMap)  <a href="classhelib_1_1_pub_key.html#a67598f5056cba7b1b94fcdd8482a947c">More...</a><br /></td></tr>
<tr class="separator:a67598f5056cba7b1b94fcdd8482a947c inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8abfcc223328521acf1976e5dd33ba53 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a8abfcc223328521acf1976e5dd33ba53">setKeySwitchMap</a> (long keyId=0)</td></tr>
<tr class="memdesc:a8abfcc223328521acf1976e5dd33ba53 inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute the reachability graph of key-switching matrices See Section 3.2.2 in the design document (KeySwitchMap)  <a href="classhelib_1_1_pub_key.html#a8abfcc223328521acf1976e5dd33ba53">More...</a><br /></td></tr>
<tr class="separator:a8abfcc223328521acf1976e5dd33ba53 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5b98b32c0ec476420d0d6f817cccd82c inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a5b98b32c0ec476420d0d6f817cccd82c">getKSStrategy</a> (long dim) const</td></tr>
<tr class="memdesc:a5b98b32c0ec476420d0d6f817cccd82c inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">get KS strategy for dimension dim dim == -1 is Frobenius  <a href="classhelib_1_1_pub_key.html#a5b98b32c0ec476420d0d6f817cccd82c">More...</a><br /></td></tr>
<tr class="separator:a5b98b32c0ec476420d0d6f817cccd82c inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a448fbc74eecbdb3b369dcea9c5d85ce2 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a448fbc74eecbdb3b369dcea9c5d85ce2">setKSStrategy</a> (long dim, int val)</td></tr>
<tr class="memdesc:a448fbc74eecbdb3b369dcea9c5d85ce2 inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">set KS strategy for dimension dim dim == -1 is Frobenius  <a href="classhelib_1_1_pub_key.html#a448fbc74eecbdb3b369dcea9c5d85ce2">More...</a><br /></td></tr>
<tr class="separator:a448fbc74eecbdb3b369dcea9c5d85ce2 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0346c2c214b648809f6b754de9e5d431 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a0346c2c214b648809f6b754de9e5d431">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, long ptxtSpace, bool highNoise) const</td></tr>
<tr class="separator:a0346c2c214b648809f6b754de9e5d431 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4daedf40ea1c65e1004289a6033d59b0 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a4daedf40ea1c65e1004289a6033d59b0">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, long ptxtSpace, bool highNoise) const</td></tr>
<tr class="separator:a4daedf40ea1c65e1004289a6033d59b0 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aafbfc62d5d78c39aa7929d552b31ff03 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aafbfc62d5d78c39aa7929d552b31ff03">CKKSencrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const NTL::ZZX &amp;plaintxt, double ptxtSize=1.0, double scaling=0.0) const</td></tr>
<tr class="separator:aafbfc62d5d78c39aa7929d552b31ff03 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13f6dfdd7645c35558ef906e8e1cfd69 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a13f6dfdd7645c35558ef906e8e1cfd69">CKKSencrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;plaintxt, double ptxtSize=1.0, double scaling=0.0) const</td></tr>
<tr class="separator:a13f6dfdd7645c35558ef906e8e1cfd69 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab26be749db4dd2b5d102a77bf70f4de3 inherit pub_methods_classhelib_1_1_pub_key"><td class="memTemplParams" colspan="2">template&lt;typename Scheme &gt; </td></tr>
<tr class="memitem:ab26be749db4dd2b5d102a77bf70f4de3 inherit pub_methods_classhelib_1_1_pub_key"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ab26be749db4dd2b5d102a77bf70f4de3">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; Scheme &gt; &amp;plaintxt, long ptxtSpace=0) const</td></tr>
<tr class="memdesc:ab26be749db4dd2b5d102a77bf70f4de3 inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypts a plaintext into a ciphertext.  <a href="classhelib_1_1_pub_key.html#ab26be749db4dd2b5d102a77bf70f4de3">More...</a><br /></td></tr>
<tr class="separator:ab26be749db4dd2b5d102a77bf70f4de3 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab8aed3e83355c67529fa2f53b2fb1ba5 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ab8aed3e83355c67529fa2f53b2fb1ba5">isCKKS</a> () const</td></tr>
<tr class="separator:ab8aed3e83355c67529fa2f53b2fb1ba5 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0ad65deb509b0e020dd603a4857492a inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ad0ad65deb509b0e020dd603a4857492a">isBootstrappable</a> () const</td></tr>
<tr class="separator:ad0ad65deb509b0e020dd603a4857492a inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a65479b612f5d28386fb1205858416957 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a65479b612f5d28386fb1205858416957">reCrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt) const</td></tr>
<tr class="separator:a65479b612f5d28386fb1205858416957 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac442b7e06a49fde0d0cd067f00c259e8 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ac442b7e06a49fde0d0cd067f00c259e8">thinReCrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ctxt) const</td></tr>
<tr class="separator:ac442b7e06a49fde0d0cd067f00c259e8 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c4f7b5816402ddaf16c7df1b60b9c6 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a45c4f7b5816402ddaf16c7df1b60b9c6">void ::helib::writePubKeyBinary</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a45c4f7b5816402ddaf16c7df1b60b9c6 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a97b95f757398bed078ac7e01efd96ec3 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">friend&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a97b95f757398bed078ac7e01efd96ec3">void ::helib::readPubKeyBinary</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_pub_key.html">PubKey</a> &amp;pk)</td></tr>
<tr class="separator:a97b95f757398bed078ac7e01efd96ec3 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad607fc183a04a38ea758df7094957410 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ad607fc183a04a38ea758df7094957410">hackPtxtSpace</a> (long p2r)</td></tr>
<tr class="separator:ad607fc183a04a38ea758df7094957410 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5744e83be6175512dc561ad9276157da inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:a5744e83be6175512dc561ad9276157da inherit pub_methods_classhelib_1_1_pub_key"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a5744e83be6175512dc561ad9276157da">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_b_g_v.html">BGV</a> &gt; &amp;plaintxt, long ptxtSpace) const</td></tr>
<tr class="separator:a5744e83be6175512dc561ad9276157da inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb5c65279c92fdecf07c34116a6854fd inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">template&lt;&gt; </td></tr>
<tr class="memitem:afb5c65279c92fdecf07c34116a6854fd inherit pub_methods_classhelib_1_1_pub_key"><td class="memTemplItemLeft" align="right" valign="top">long&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#afb5c65279c92fdecf07c34116a6854fd">Encrypt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;ciphertxt, const <a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_c_k_k_s.html">CKKS</a> &gt; &amp;plaintxt, <a class="el" href="api_attributes_8h.html#addf5ec070e9499d36b7f2009ce736076">UNUSED</a> long ptxtSpace) const</td></tr>
<tr class="separator:afb5c65279c92fdecf07c34116a6854fd inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf27c278c7ae39ad8f7550774693fe2d inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const std::vector&lt; <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#adf27c278c7ae39ad8f7550774693fe2d">keySWlist</a> () const</td></tr>
<tr class="separator:adf27c278c7ae39ad8f7550774693fe2d inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e271b46f74eb1f10deeb15f38ef612 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a36e271b46f74eb1f10deeb15f38ef612">getKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from, long toID=0) const</td></tr>
<tr class="memdesc:a36e271b46f74eb1f10deeb15f38ef612 inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Find a key-switching matrix by its indexes. If no such matrix exists it returns a dummy matrix with toKeyID==-1.  <a href="classhelib_1_1_pub_key.html#a36e271b46f74eb1f10deeb15f38ef612">More...</a><br /></td></tr>
<tr class="separator:a36e271b46f74eb1f10deeb15f38ef612 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1699dcc28066d1628d4924b00c03ff7f inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a1699dcc28066d1628d4924b00c03ff7f">getKeySWmatrix</a> (long fromSPower, long fromXPower, long fromID=0, long toID=0) const</td></tr>
<tr class="separator:a1699dcc28066d1628d4924b00c03ff7f inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aabf2e70d488f0e10604861d9d1d1b586 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#aabf2e70d488f0e10604861d9d1d1b586">haveKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from, long toID=0) const</td></tr>
<tr class="separator:aabf2e70d488f0e10604861d9d1d1b586 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a802336b0a511ddfe07495d6386061041 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a802336b0a511ddfe07495d6386061041">haveKeySWmatrix</a> (long fromSPower, long fromXPower, long fromID=0, long toID=0) const</td></tr>
<tr class="separator:a802336b0a511ddfe07495d6386061041 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a78cf90689deb41b4dcd2346722e22d9d inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a78cf90689deb41b4dcd2346722e22d9d">getAnyKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from) const</td></tr>
<tr class="memdesc:a78cf90689deb41b4dcd2346722e22d9d inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is there a matrix from this key to <em>any</em> base key?  <a href="classhelib_1_1_pub_key.html#a78cf90689deb41b4dcd2346722e22d9d">More...</a><br /></td></tr>
<tr class="separator:a78cf90689deb41b4dcd2346722e22d9d inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85d422013d6854bd95947a75da4ccf63 inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a85d422013d6854bd95947a75da4ccf63">haveAnyKeySWmatrix</a> (const <a class="el" href="classhelib_1_1_s_k_handle.html">SKHandle</a> &amp;from) const</td></tr>
<tr class="separator:a85d422013d6854bd95947a75da4ccf63 inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a9ef8dbc3d89b669b8b375352a64e0c inherit pub_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_key_switch.html">KeySwitch</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#a0a9ef8dbc3d89b669b8b375352a64e0c">getNextKSWmatrix</a> (long fromXPower, long fromID=0) const</td></tr>
<tr class="memdesc:a0a9ef8dbc3d89b669b8b375352a64e0c inherit pub_methods_classhelib_1_1_pub_key"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the next matrix to use for multi-hop automorphism See Section 3.2.2 in the design document.  <a href="classhelib_1_1_pub_key.html#a0a9ef8dbc3d89b669b8b375352a64e0c">More...</a><br /></td></tr>
<tr class="separator:a0a9ef8dbc3d89b669b8b375352a64e0c inherit pub_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a9b5d86313db97a999d6022030c81062e"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classhelib_1_1_double_c_r_t.html">DoubleCRT</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a9b5d86313db97a999d6022030c81062e">sKeys</a></td></tr>
<tr class="separator:a9b5d86313db97a999d6022030c81062e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a99109270d1e866593aee2b0e9a7cdc8d"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a99109270d1e866593aee2b0e9a7cdc8d">operator&lt;&lt;</a> (std::ostream &amp;str, const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;sk)</td></tr>
<tr class="separator:a99109270d1e866593aee2b0e9a7cdc8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7742d711e4a9d3b19e31e5113c60107e"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_sec_key.html#a7742d711e4a9d3b19e31e5113c60107e">operator&gt;&gt;</a> (std::istream &amp;str, <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;sk)</td></tr>
<tr class="separator:a7742d711e4a9d3b19e31e5113c60107e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_static_methods_classhelib_1_1_pub_key"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classhelib_1_1_pub_key')"><img src="closed.png" alt="-"/>&#160;Static Public Member Functions inherited from <a class="el" href="classhelib_1_1_pub_key.html">helib::PubKey</a></td></tr>
<tr class="memitem:ac16ee4cbf52d86accf5f7e82a83f3991 inherit pub_static_methods_classhelib_1_1_pub_key"><td class="memItemLeft" align="right" valign="top">static long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_pub_key.html#ac16ee4cbf52d86accf5f7e82a83f3991">ePlusR</a> (long p)</td></tr>
<tr class="separator:ac16ee4cbf52d86accf5f7e82a83f3991 inherit pub_static_methods_classhelib_1_1_pub_key"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The secret key. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a6e4c7855fbe80883f4207e011c74e22b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e4c7855fbe80883f4207e011c74e22b">&#9670;&nbsp;</a></span>SecKey() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::SecKey::SecKey </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a4a76975c743941bae142bd524de4d3ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4a76975c743941bae142bd524de4d3ee">&#9670;&nbsp;</a></span>~SecKey()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::SecKey::~SecKey </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">default</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="aa1c8653eefcac6ffeae0dd9c7ce9e34e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa1c8653eefcac6ffeae0dd9c7ce9e34e">&#9670;&nbsp;</a></span>SecKey() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::SecKey::SecKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_context.html">Context</a> &amp;&#160;</td>
          <td class="paramname"><em>_context</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae51b00cb02aa6e958f19c8a27eb40204"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae51b00cb02aa6e958f19c8a27eb40204">&#9670;&nbsp;</a></span>clear()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::clear </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clear all secret-key data. </p>

<p>Reimplemented from <a class="el" href="classhelib_1_1_pub_key.html#aa13affb78adf902978fad938c8f56eae">helib::PubKey</a>.</p>

</div>
</div>
<a id="a3d0dd7ac99a4431c16149607adf46995"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d0dd7ac99a4431c16149607adf46995">&#9670;&nbsp;</a></span>Decrypt() <span class="overload">[1/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::Decrypt </td>
          <td>(</td>
          <td class="paramtype">NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a6fa22860d6aafccc5063a483ec6056a4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6fa22860d6aafccc5063a483ec6056a4">&#9670;&nbsp;</a></span>Decrypt() <span class="overload">[2/5]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::Decrypt </td>
          <td>(</td>
          <td class="paramtype">NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>f</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Debugging version, returns in f the polynomial before reduction modulo the ptxtSpace. </p>

</div>
</div>
<a id="a039945ecbbe337f7fba1cde992ebf825"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a039945ecbbe337f7fba1cde992ebf825">&#9670;&nbsp;</a></span>Decrypt() <span class="overload">[3/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::Decrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_b_g_v.html">BGV</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a5602ff47445696d3af12ba6114eebea4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5602ff47445696d3af12ba6114eebea4">&#9670;&nbsp;</a></span>Decrypt() <span class="overload">[4/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::Decrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; <a class="el" href="structhelib_1_1_c_k_k_s.html">CKKS</a> &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a64b2c5e68619fb09448d91c697827fec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64b2c5e68619fb09448d91c697827fec">&#9670;&nbsp;</a></span>Decrypt() <span class="overload">[5/5]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Scheme &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::Decrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ptxt.html">Ptxt</a>&lt; Scheme &gt; &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrypt a ciphertext into a plaintext. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">Scheme</td><td>Encryption scheme used (must be <code><a class="el" href="structhelib_1_1_b_g_v.html" title="Type for BGV scheme, to be used as template parameter.">BGV</a></code> or <code><a class="el" href="structhelib_1_1_c_k_k_s.html" title="Type for CKKS scheme, to be used as template parameter.">CKKS</a></code>). </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">plaintxt</td><td>Plaintext into which to decrypt. </td></tr>
    <tr><td class="paramname">ciphertxt</td><td>Ciphertext to decrypt. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a623e7afa711f904482381dd31476502d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a623e7afa711f904482381dd31476502d">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classhelib_1_1_pub_key.html#a784412272e2ac12de357319b60c35f36">helib::PubKey</a>.</p>

</div>
</div>
<a id="a8173d4d2d15958e9ba7ceb0a28d21179"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8173d4d2d15958e9ba7ceb0a28d21179">&#9670;&nbsp;</a></span>Encrypt() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::Encrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ciphertxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;&#160;</td>
          <td class="paramname"><em>plaintxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reimplemented from <a class="el" href="classhelib_1_1_pub_key.html#a7fec47c6a84534ed1b359e3a64f54a83">helib::PubKey</a>.</p>

</div>
</div>
<a id="a350d34d3415174be94701ed1b62fc0b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a350d34d3415174be94701ed1b62fc0b0">&#9670;&nbsp;</a></span>GenKeySWmatrix()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::SecKey::GenKeySWmatrix </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromSPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromXPower</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>fromKeyIdx</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>toKeyIdx</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Generate a key-switching matrix and store it in the public key. The i'th column of the matrix encrypts fromKey*B1*B2*...*B{i-1}*Q under toKey, relative to the largest modulus (i.e., all primes) and plaintext space p. Q is the product of special primes, and the Bi's are the products of primes in the i'th digit. The plaintext space defaults to 2^r, as defined by context.mod2r. </p>

</div>
</div>
<a id="a69d79957cc0259376b9ab024c2d643dd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69d79957cc0259376b9ab024c2d643dd">&#9670;&nbsp;</a></span>genRecryptData()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::genRecryptData </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate bootstrapping data if needed, returns index of key. </p>

</div>
</div>
<a id="a101e0d4a5d06aaab7db1c1a776fc66c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a101e0d4a5d06aaab7db1c1a776fc66c6">&#9670;&nbsp;</a></span>GenSecKey()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::GenSecKey </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>hwt</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>maxDegKswitch</em> = <code>3</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Key generation: This procedure generates a single secret key, pushes it onto the sKeys list using ImportSecKey from above. </p>

</div>
</div>
<a id="a8b196190eb15a05ebc9504a24fac4dcc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b196190eb15a05ebc9504a24fac4dcc">&#9670;&nbsp;</a></span>ImportSecKey()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::ImportSecKey </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_double_c_r_t.html">DoubleCRT</a> &amp;&#160;</td>
          <td class="paramname"><em>sKey</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&#160;</td>
          <td class="paramname"><em>bound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>maxDegKswitch</em> = <code>3</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>We allow the calling application to choose a secret-key polynomial by itself, then insert it into the <a class="el" href="classhelib_1_1_sec_key.html" title="The secret key.">SecKey</a> object, getting the index of that secret key in the sKeys list. If this is the first secret-key for this object then the procedure below also generates a corresponding public encryption key. It is assumed that the context already contains all parameters. </p>

</div>
</div>
<a id="a0d2a050b717383ff79c735306002b89f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d2a050b717383ff79c735306002b89f">&#9670;&nbsp;</a></span>operator!=()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::SecKey::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a89f716652c0dcd439905d4769647040d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89f716652c0dcd439905d4769647040d">&#9670;&nbsp;</a></span>operator==()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool helib::SecKey::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="ad4dce93de49598069ce22e850c4ce824"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4dce93de49598069ce22e850c4ce824">&#9670;&nbsp;</a></span>skEncrypt() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::skEncrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ctxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>ptxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>skIdx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Symmetric encryption using the secret key. </p>

</div>
</div>
<a id="a070001bd33906bc22e133db9f31c07cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a070001bd33906bc22e133db9f31c07cd">&#9670;&nbsp;</a></span>skEncrypt() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long helib::SecKey::skEncrypt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>ctxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#a4d6002f36f1a61982fded09adf1331ca">zzX</a> &amp;&#160;</td>
          <td class="paramname"><em>ptxt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>ptxtSpace</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>skIdx</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a7f35adf909fde993329e2253f54565f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f35adf909fde993329e2253f54565f4">&#9670;&nbsp;</a></span>void ::helib::readSecKeyBinary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::SecKey::void ::<a class="el" href="namespacehelib.html#a69b0297bb0e296d5dc39bb328d735007">helib::readSecKeyBinary</a> </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>sk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<a id="a1e15e33f3688426b326404123804291a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1e15e33f3688426b326404123804291a">&#9670;&nbsp;</a></span>void ::helib::writeSecKeyBinary()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">helib::SecKey::void ::<a class="el" href="namespacehelib.html#a360f4b2c5989ceac05b2f37fe89239f2">helib::writeSecKeyBinary</a> </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>sk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a99109270d1e866593aee2b0e9a7cdc8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a99109270d1e866593aee2b0e9a7cdc8d">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>sk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a7742d711e4a9d3b19e31e5113c60107e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7742d711e4a9d3b19e31e5113c60107e">&#9670;&nbsp;</a></span>operator&gt;&gt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::istream&amp; operator&gt;&gt; </td>
          <td>(</td>
          <td class="paramtype">std::istream &amp;&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_sec_key.html">SecKey</a> &amp;&#160;</td>
          <td class="paramname"><em>sk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a9b5d86313db97a999d6022030c81062e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b5d86313db97a999d6022030c81062e">&#9670;&nbsp;</a></span>sKeys</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt;<a class="el" href="classhelib_1_1_double_c_r_t.html">DoubleCRT</a>&gt; helib::SecKey::sKeys</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/HElib/include/helib/<a class="el" href="keys_8h_source.html">keys.h</a></li>
<li>/HElib/src/<a class="el" href="keys_8cpp.html">keys.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
